home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4187 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: news.pi.net!news
  2. From: heggie <heggie@pi.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: class INTERFACE declaration ?? ::: USE SEMICOLEN ;;;;;;;;
  5. Date: Sun, 28 Jan 1996 20:29:26 -0800
  6. Organization: heggie
  7. Message-ID: <310C4D26.715E@pi.net>
  8. References: <310C267F.78BC@pi.net>
  9. NNTP-Posting-Host: gro32.pi.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (Win16; I)
  14.  
  15. DOMT READ JUST FORGOT MY SEMICOLEN AFTER CLASS DECLARATION!!!
  16.  
  17.  
  18.  
  19. heggie wrote:
  20. > I'm trying to implement a Date class who exists
  21. > of three int fields and some interfaces, with the
  22. > last thing i'm having some problems
  23. > (ps using borlands c++ for windows)
  24. > I can't think of a reason why the interface declaration
  25. > of setdate is wrong, anybody outhere maybe????
  26. > THANKs in advantage,
  27. > #include <stdio.h>
  28. > #include <stdlib.h>
  29. > #include <string.h>
  30. > #include <iostream.h>
  31. > class Date
  32. > {
  33. >         public:
  34. >                 void setdate (int d, int m, int y);
  35. >                 void printdate ();
  36. >                 void nextday();
  37. >         private:
  38. >                 int
  39. >                         day,
  40. >                         month,
  41. >                         year;
  42. > }
  43. > void Date::setdate (int d, int m, int y)
  44. > {
  45. > .........
  46. > }
  47. > ************************************************
  48. > Compiling ..\SOURCES\OPDR_48.CPP:
  49. > Error ..\SOURCES\OPDR_48.CPP 21: Too many types in declaration
  50. > Error ..\SOURCES\OPDR_48.CPP 22: Type 'Date' may not be defined here
  51. > Error ..\SOURCES\OPDR_48.CPP 22: 'Date::setdate(int,int,int)' is not a
  52. > member of 'Date'
  53.